<template>
  <el-table
     :data="reset"
    @selection-change="handleSelectionChange"
    @row-click="handleCurrentChange"
    style="width: 100%"
    border
    :header-cell-style="{background:'#f4f4f4'}">
    <el-table-column 
    fixed 
    type="selection"
    align="center"
     width="50">
     </el-table-column>
    <el-table-column
      prop="TechRouteId"
      align="center"
      width="50"
      label="ID">
    </el-table-column>
    <el-table-column
      prop="Name"
      width="130"
      align="center"
      :show-overflow-tooltip="true"
      label="工艺路线简称">
    </el-table-column>
    <el-table-column
      prop="Description"
      align="center"
      label="描述">
    </el-table-column>
    <el-table-column
      prop=""
      align="center"
      label="版本">
    </el-table-column>
    <el-table-column
      prop="StatusFormat"
      align="center"
      label="状态">
    </el-table-column>
    <el-table-column
      prop="CreateByFormat"
       :show-overflow-tooltip="true" 
      align="center"
      label="创建人">
    </el-table-column>
    <el-table-column
      prop="CreateTime"
      align="center"
      :show-overflow-tooltip="true" 
      label="创建时间">
    </el-table-column>
    <el-table-column
      prop="LastModifyByFormat"
       :show-overflow-tooltip="true" 
      align="center"
      label="修改人">
    </el-table-column>
    <el-table-column
      prop="LastModifyTime"
      align="center"
      :show-overflow-tooltip="true" 
      label="修改时间">
    </el-table-column>
  </el-table>
</template>

<script>
export default {
  props: {
    reset: {
      type: Array
    }
  },
  data() {
    return {
      currentRow:''
    }
  },
  methods:{
    handleSelectionChange(val){
      this.$emit('changeData',val)
      let listId=[]
      val.forEach(el => {
          listId.push(el.TechRouteId)
      });
      this.$emit('getId',listId)   
    },
    handleCurrentChange(val){
      this.$emit('getTec',val)
    }
  }
}
</script>